{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Using TensorFlow backend.\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import tensorflow as tf\n",
    "\n",
    "import datetime\n",
    "\n",
    "import gym\n",
    "import trading_env\n",
    "\n",
    "import os\n",
    "import agent \n",
    "from os import __file__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Loading historical data file\n"
     ]
    }
   ],
   "source": [
    "#env = gym.make('trading-v0')\n",
    "env_trading = gym.make('test_trading-v0')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Holder Agent\n",
    "--------------\n",
    "To begin a holder agent will run on the month of march 2017, which will provide a reference to compare future agents. The same could also be done with a random agent. A holder agent is equivalent to set the action to 1 at each step (selling 100% of the portfolio's fiat)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "date = datetime.datetime(2017, 5, 1, 0, 0)\n",
    "env_trading.reset(date=date)\n",
    "rewards = []\n",
    "portfolio = []\n",
    "while True:\n",
    "    action = 1.0 #Holding\n",
    "    s, r, done, _ = env_trading.step(action)\n",
    "    rewards.append(r)\n",
    "    portfolio.append(env_trading.portfolio_value)\n",
    "    if done:\n",
    "        break"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAD8CAYAAACRkhiPAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxv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+Bse7wqlGsArsTZgVUEXBFl1/NPK94V1j+wHrbz77CuZz0w\nLRr/LoHjcTb1rACWWf+dFuOfU6BritnPCjgGWGrFvgq42yrvh/MmXgS8CaRa5WnW4yLr+X6NXWug\n/3TGsFJKxbFYbg5SSinVTJoElFIqjmkSUEqpOKZJQCml4pgmAaWUimOaBJRSKo5pElBKqTimSUAp\npeLY/wcz5YhVqAH9oQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fae47bb7dd8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(portfolio)\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
